package org.example.gateway.helper;

import org.springframework.util.AntPathMatcher;

import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
public class RequestHelper {
    private static final AntPathMatcher pathMatcher = new AntPathMatcher();

    // 校验url是否要拦截
    public static boolean checkUrl(String str, List<String> urls){
        for (String path : urls) {
            if (pathMatcher.match(path,str)){
                return true;
            }
        }
        return false;
    }
}
